package com.shen.shop;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 * Author:shen
 * CreateDate:2020/6/10.
 * Function:
 */
public class Product {

    private int itemno; //商品编号
    private String name;//商品名称
    private double price;//商品单价
    private int stockcount;//库存
    private String unit;//单位
    private boolean discount;//是否打折
    private String factoryaddr;//工厂地址

    public Product() {
    }

    public Product(int itemno, String name, double price, int stockcount, String unit, boolean discount, String factoryaddr) {
        this.itemno = itemno;
        this.name = name;
        this.price = price;
        this.stockcount = stockcount;
        this.unit = unit;
        this.discount = discount;
        this.factoryaddr = factoryaddr;
    }

    public int getItemno() {
        return itemno;
    }

    public void setItemno(int itemno) {
        this.itemno = itemno;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getStockcount() {
        return stockcount;
    }

    public void setStockcount(int stockcount) {
        this.stockcount = stockcount;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public boolean getDiscount() {
        return discount;
    }

    public void setDiscount(boolean discount) {
        this.discount = discount;
    }

    public String getFactoryaddr() {
        return factoryaddr;
    }

    public void setFactoryaddr(String factoryaddr) {
        this.factoryaddr = factoryaddr;
    }

    @Override
    public String toString() {
        return "Product{" +
                "itemno=" + itemno +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", stockcount=" + stockcount +
                ", unit='" + unit + '\'' +
                ", discount=" + discount +
                ", factoryaddr='" + factoryaddr + '\'' +
                '}';
    }
}
